<template>
	<view :style="{height: statusHeight + 'rpx',backgroundColor:backgroundColor}">

	</view>
</template>

<script setup>
	const props = defineProps({
		backgroundColor: {
			type: String,
			default: ''
		}
	})
	import {
		ref,
		computed,
		onMounted,
		watch,
	} from 'vue';
	const statusHeight = ref(0)
	onMounted(() => {
		//获取屏幕状态栏高度
		uni.getSystemInfo({
			success: function(res) {
				statusHeight.value = res.statusBarHeight + 20;
			}
		})
	})
</script>

<style>

</style>